
public class Artist extends Item {
	private static final long serialVersionUID = 1L;	//Just for serialized
	int ilen;			//Length of the itemsBy Array
	Item[] itemsBy;		//The items created by this artist

	
	Artist(){
		//Default constructor
		ilen =0;
		itemsBy = new Item[32];
	}
	
	Artist(Item item){
		//Copy constructor the make Artists out of items
		super(item);
		ilen = 0;
		itemsBy = new Item[32];
	}

	void putItemBy(Item item) {
		//Add an item to the the itemsBy array
		if (ilen > itemsBy.length - 1) {
			growItemBy();
		}
		itemsBy[ilen] = item;
		ilen++;
	}

	void shrinkItemBy() {
		//Shrink the itemsBy array to a minimal size
		Item[] temp = new Item[ilen];
		System.arraycopy(itemsBy, 0, temp, 0, ulen);
		itemsBy = temp;
		temp = null;

	}

	private void growItemBy() {
		Item[] temp = new Item[ilen * 2];
		System.arraycopy(itemsBy, 0, temp, 0, ilen);
		itemsBy = temp;
		temp = null;
	}
}
